﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace YJKCodeBase.StringUtility
{
	internal class MD5Coder : IEnCoder
	{
		public string EnCode(string input)
		{
			string text = string.Empty;
			MD5 md = MD5.Create();
			byte[] array = md.ComputeHash(Encoding.UTF8.GetBytes(input));
			for (int i = 0; i < array.Length; i++)
			{
				text += array[i].ToString("X");
			}
			return text;
		}
	}
}
